<!-- 
    Document   : tipstricks
    Created on : 01.05.2008, 19:37:29
    Author     : Iulian
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Tips and Tricks</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Below are some tips and tricks I found useful while working with the SMF backups (and
    MySQL database files in general).
    <ul>
        <li>SSL: If your website is using a self-signed certificate that your JVM does not trust, you have to
            create new keystore with the server certificate(s) which you then have to
            copy to your java.home/jre/lib/security folder. Otherwise you will get an exception : "sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
            <br/><br/>
            For an easy way on how to do add a new keystore, please check <a href="http://blogs.sun.com/andreas/entry/no_more_unable_to_find">http://blogs.sun.com/andreas/entry/no_more_unable_to_find</a>
            <br/><br/>
            If you have more Java SDKs installed on your system, you can find the one that was used to start the application by checking the About box.
            Do not forget, you need to put the keystore into the java.home/jre/lib/security folder.
        </li>
        
        <li>If using MySQL and you need to import an .sql file of a database 
        containing UTF-8 encoding, please remember to use the 
        <br/><br/>
            <tt>--default_character_set utf8</tt>
        <br/><br/>
        option on the mysql command line.
        
        Example:<br/><br/>
        <tt>mysql -u &lt;username&gt; -p --default_character_set utf8 &lt;database_name&gt; &lt; &lt;script.sql&gt;</tt>
        <br/>
        
        <li>Text editor to use when checking huge text files: vi
        <br/>There's a vi for Windows too: <a href="http://www.vim.org/download.php#pc">http://www.vim.org/download.php#pc</a>
        (sorry emacs aficionados, my text edditing in linux is sporadic, so I stick with vi)
        <br/><br/>If you get an SQL error on line &lt;hundreds of thousands&gt; like I did, just type
        <tt>:&lt;line&gt;</tt> and press Enter. You should be taken to that line.
        <br/><br/>
    </ul>
  </body>
</html>
